package com.web.cms.pan.service;

import com.blue.jdbc.JdbcDataSource;
import com.blue.jdbc.Page;
import com.web.cms.pan.dao.DeleteFileDataDao;
import com.web.cms.pan.model.DeleteFileData;
import com.web.core.util.Const;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * 待删除文件数据业务层
 * 
 * @author 代码由 blue-code 框架生成
 * @since 1.0 2018年04月09日
 */
@Service("panDeleteFileDataService")
@Transactional
@JdbcDataSource(Const.DS_CMS)
public class DeleteFileDataService
{
	@Autowired
	private DeleteFileDataDao deleteFileDataDao;
	
	public DeleteFileDataService()
	{
	}
	
	public DeleteFileData get(Integer id)
	{
		DeleteFileData deleteFileData = deleteFileDataDao.get(id);
		return deleteFileData;
	}

	public Map<Integer, DeleteFileData> getList(List<Integer> idList)
	{
		Map<Integer, DeleteFileData> map = deleteFileDataDao.getList(idList);
		return map;
	}
	
	public Page<DeleteFileData> list(DeleteFileData deleteFileData, Page<DeleteFileData> page)
	{
		page = deleteFileDataDao.list(deleteFileData, page);
		return page;
	}
	
	public void delete(List<Integer> idList)
	{
		deleteFileDataDao.delete(idList);
	}
	
}
